package com.lantosec.hmrp.modules.supplier.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lantosec.hmrp.core.kit.PageVO;
import com.lantosec.hmrp.modules.supplier.entity.SupplierBad;
import com.lantosec.hmrp.modules.supplier.vo.SupplierBadVO;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 供应商不良记录 Mapper 接口
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-21
 */
public interface SupplierBadMapper extends BaseMapper<SupplierBad> {
    /**
     * 根据条件查询供应商不良记录
     *
     * @param page
     * @param supplierCode
     * @param badType
     * @param startTime
     * @param endTime
     * @return
     */
    public PageVO<SupplierBadVO> querySupplierBad(PageVO<SupplierBadVO> page,
                                                  @Param("supplierCode") String supplierCode,
                                                  @Param("badType") String badType,
                                                  @Param("startTime") String startTime,
                                                  @Param("endTime") String endTime);

    /**
     * 取消供应商的暂停采购
     *
     * @param supplierCode
     */
    void cancelSupplierPurchase(String supplierCode);

    /**
     * 取消供应商的黑名单
     *
     * @param supplierCode
     */
    void cancelSupplierBlacklist(String supplierCode);
}
